<script setup>
import {reactive} from "vue";
const props = defineProps({
  probeConfig: {
    type: Object,
  },
  containerIndex: {
    type: Number,
  },
  probeType: {
    type: String
  },
  containerType: {
    type: String,
  },
})
const rules =reactive({
  port: [
    {required: true,message: '请输入需要探测的端口号',trigger: 'blur'},
  ]
})

</script>

<template>
  <el-row :gutter="20">
    <el-col :span="8">
      <el-form-item label="探测端口" :rules="rules.port"  :prop="('spec.template.spec.containers.'+props.containerIndex+'.'+props.probeType+'.grpc.port')" required>
        <el-input-number :min="1" :max="65535" :controls="false" v-model="props.probeConfig.grpc.port"></el-input-number>
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item label="探测Service" prop="" >
        <el-input v-model="props.probeConfig.grpc.service" placeholder="请输入需要探测的Service(可选)" style="width: 240px"></el-input>
      </el-form-item>
    </el-col>
  </el-row>
</template>
<style scoped>
</style>